package com.blb.zycommunity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 报修信息
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@Data
@TableName("zy_repair")
@ApiModel(value = "ZyRepair对象", description = "报修信息")
public class ZyRepair implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("报修ID")
    @TableId(value = "repair_id", type = IdType.AUTO)
    private Long repairId;

    @ApiModelProperty("报修编号")
    private String repairNum;

    @ApiModelProperty("报修状态")
    private String repairState;

    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("派单时间")
    private LocalDateTime assignmentTime;

    @ApiModelProperty("接单时间")
    private LocalDateTime receivingOrdersTime;

    @ApiModelProperty("处理完成时间")
    private LocalDateTime completeTime;

    @ApiModelProperty("取消时间")
    private LocalDateTime cancelTime;

    @ApiModelProperty("期待上门时间")
    private LocalDateTime doorTime;

    @ApiModelProperty("分派人id")
    private Long assignmentId;

    @ApiModelProperty("处理人id")
    private Long completeId;

    @ApiModelProperty("处理人电话")
    private String completePhone;

    @ApiModelProperty("处理人姓名")
    private String completeName;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("创建者")
    private String createBy;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新者")
    private String updateBy;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty("创建人id")
    private Long userId;

    @ApiModelProperty("删除状态0默认1删除")
    private Integer delFlag;

    @ApiModelProperty("报修内容")
    private String repairContent;

    @ApiModelProperty("小区ID")
    private Long communityId;

    @ApiModelProperty("详细地址")
    private String address;

    @ApiModelProperty("报修范围（公告区域，家庭区域）")
    private String repairScope;

    @ApiModelProperty("图片地址")
    private String url;

    @TableField(exist = false)
    private ZyOwner zyOwner;


    public Long getRepairId() {
        return repairId;
    }

    public void setRepairId(Long repairId) {
        this.repairId = repairId;
    }

    public String getRepairNum() {
        return repairNum;
    }

    public void setRepairNum(String repairNum) {
        this.repairNum = repairNum;
    }

    public String getRepairState() {
        return repairState;
    }

    public void setRepairState(String repairState) {
        this.repairState = repairState;
    }

    public LocalDateTime getAssignmentTime() {
        return assignmentTime;
    }

    public void setAssignmentTime(LocalDateTime assignmentTime) {
        this.assignmentTime = assignmentTime;
    }

    public LocalDateTime getReceivingOrdersTime() {
        return receivingOrdersTime;
    }

    public void setReceivingOrdersTime(LocalDateTime receivingOrdersTime) {
        this.receivingOrdersTime = receivingOrdersTime;
    }

    public LocalDateTime getCompleteTime() {
        return completeTime;
    }

    public void setCompleteTime(LocalDateTime completeTime) {
        this.completeTime = completeTime;
    }

    public LocalDateTime getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(LocalDateTime cancelTime) {
        this.cancelTime = cancelTime;
    }

    public LocalDateTime getDoorTime() {
        return doorTime;
    }

    public void setDoorTime(LocalDateTime doorTime) {
        this.doorTime = doorTime;
    }

    public Long getAssignmentId() {
        return assignmentId;
    }

    public void setAssignmentId(Long assignmentId) {
        this.assignmentId = assignmentId;
    }

    public Long getCompleteId() {
        return completeId;
    }

    public void setCompleteId(Long completeId) {
        this.completeId = completeId;
    }

    public String getCompletePhone() {
        return completePhone;
    }

    public void setCompletePhone(String completePhone) {
        this.completePhone = completePhone;
    }

    public String getCompleteName() {
        return completeName;
    }

    public void setCompleteName(String completeName) {
        this.completeName = completeName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getRepairContent() {
        return repairContent;
    }

    public void setRepairContent(String repairContent) {
        this.repairContent = repairContent;
    }

    public Long getCommunityId() {
        return communityId;
    }

    public void setCommunityId(Long communityId) {
        this.communityId = communityId;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public String toString() {
        return "ZyRepair{" +
            "repairId = " + repairId +
            ", repairNum = " + repairNum +
            ", repairState = " + repairState +
            ", assignmentTime = " + assignmentTime +
            ", receivingOrdersTime = " + receivingOrdersTime +
            ", completeTime = " + completeTime +
            ", cancelTime = " + cancelTime +
            ", doorTime = " + doorTime +
            ", assignmentId = " + assignmentId +
            ", completeId = " + completeId +
            ", completePhone = " + completePhone +
            ", completeName = " + completeName +
            ", remark = " + remark +
            ", createBy = " + createBy +
            ", createTime = " + createTime +
            ", updateBy = " + updateBy +
            ", updateTime = " + updateTime +
            ", userId = " + userId +
            ", delFlag = " + delFlag +
            ", repairContent = " + repairContent +
            ", communityId = " + communityId +
            ", address = " + address +
        "}";
    }
}
